package cn.didi.feidi.androidorder.fragment.personal;


import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import cn.didi.feidi.androidorder.R;
import cn.didi.feidi.androidorder.activity.personal.FindBackPayPswByAccountPswActivity;
import cn.didi.feidi.androidorder.activity.personal.FindBackPayPswByVerifyCodeActivity;
import cn.didi.feidi.androidorder.fragment.FeidiBaseFragment;


public class PersonFindBackPayPasswordGuideFragment extends FeidiBaseFragment {

    private static final String TAG = "FindBackPayPswGuid";

    private LinearLayout findBackPayPswByVerifyCode;
    private LinearLayout findBackPayPswByAccountPsw;


    /**
     * 与activity关联，后面可考虑单例模式
     *
     * @param bundle
     * @return
     */
    public static PersonFindBackPayPasswordGuideFragment newInstance(Bundle bundle) {
        PersonFindBackPayPasswordGuideFragment fragment = new PersonFindBackPayPasswordGuideFragment();
        if (bundle != null)
            fragment.setArguments(bundle);
        return fragment;
    }


    @Override
    protected View initFragment(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_person_wallet_pay_setting_find_back_pay_password_guide, container, false);
        Log.d(TAG, "initFragment");
        return rootView;
    }

    @Override
    protected void initViews(View rootView) {
        findBackPayPswByVerifyCode = (LinearLayout) rootView.findViewById(R.id.person_wallet_pay_setting_find_back_pay_password_by_verify_code);
        findBackPayPswByAccountPsw = (LinearLayout) rootView.findViewById(R.id.person_wallet_pay_setting_find_back_pay_password_by_account_password);
    }

    @Override
    protected void initData() {
    }

    @Override
    protected void addListener() {
        findBackPayPswByVerifyCode.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getContext(), FindBackPayPswByVerifyCodeActivity.class);
                startActivity(intent);
            }
        });
        findBackPayPswByAccountPsw.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getContext(), FindBackPayPswByAccountPswActivity.class);
                startActivity(intent);
            }
        });
    }

}
